package com.uwlaser.service;

import com.uwlaser.base.PageInfo;
import com.uwlaser.base.CommonService;
import com.uwlaser.domain.DataMaterialBatchHistory;
import com.uwlaser.service.dto.DataMaterialBatchHistoryDto;
import com.uwlaser.service.dto.DataMaterialBatchHistoryQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author zk-Qin
* @date 2022-05-11
*/
public interface DataMaterialBatchHistoryService extends CommonService<DataMaterialBatchHistory>  {

    static final String CACHE_KEY = "dataMaterialBatchHistory";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<DataMaterialBatchHistoryDto>
    */
    PageInfo<DataMaterialBatchHistoryDto> queryAll(DataMaterialBatchHistoryQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<DataMaterialBatchHistoryDto>
    */
    List<DataMaterialBatchHistoryDto> queryAll(DataMaterialBatchHistoryQueryParam query);

    DataMaterialBatchHistory getById(Integer id);
    DataMaterialBatchHistoryDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(DataMaterialBatchHistoryDto resources);
    int updateById(DataMaterialBatchHistoryDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    /**
     * 恢复物料批次-历史
     * @param resources
     * @return
     */
    int recover(List<DataMaterialBatchHistoryDto> resources);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<DataMaterialBatchHistoryDto> all, HttpServletResponse response) throws IOException;
}
